<?php
    require_once ("Model/LoginHandler.php");
	require_once ("Model/DBConnection.php");
	require_once ("settings.php");
	require_once ("../Log/Log.php");
	require_once ("../Log/LogView.php");
	require_once ("../Validation/Validate.php");
	require_once ("Model/UserHandler.php");
	
	session_start();
	$aDBConnection = new DBConnection();
	$aDBConnection->Connect();
	
	$aValidate = new Validate();
	$aUserHandler = new UserHandler($aDBConnection);
	$aLoginHandler = new LoginHandler($aUserHandler);
	$aLogView = new LogView();
	
	if($aValidate->Test() == true){
		$body = "Validate ok";
	}
	else{
		$body = "Fel på Validate";
	}
	$body .= "<br/>";
	if($aLoginHandler->Test() == true){
		$body .= "LoginHandler ok";
	}
	else{
		$body .= "Fel på LoginHandler";
	}
	$body .= "<br/>";
	if($aUserHandler->Test() == true){
		$body .= "UserHandler ok";
	}
	else{
		$body .= "Fel på UserHandler";
	}
	$aDBConnection->Close();
	$aLogView->ShowMessages();
	
	?>
	
	<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title>Test</title>
   <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  </head>
  <body >
 <?php echo $body; ?>
  </body>
</html>